package com.mapper;

import com.pojo.Person;
import com.pojo.Worker;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

/**
* @author ASUS
* @description 针对表【tb_worker】的数据库操作Mapper
* @createDate 2024-11-15 09:09:12
* @Entity com.pojo.Worker
*/
public interface WorkerMapper {
    @Select("select * from tb_worker where id = #{id}")

    int deleteByPrimaryKey(Long id);

    int insert(Worker record);

    int insertSelective(Worker record);

    Worker selectByPrimaryKey(Long id);

    int updateByPrimaryKeySelective(Worker record);

    int updateByPrimaryKey(Worker record);

    @Select("select * from tb_worker where id = #{id}")
    Worker selectWorker(int id);

    @Insert("insert into tb_worker(name, age,sex, worker_id) values(#{name}, #{age}, #{sex}, #{worker_id})")
    int insertworker(Worker worker);

    @Insert("insert into tb_worker(name, age,sex, worker_id)" +"values(#{name}, #{age}, #{sex}, #{worker_id})")
    int insertworker2(Worker worker);
    @Select("select * from tb_worker where id = #{param01} and name = #{param02}")
    Worker selectWorkerByIdAndName(@Param("Param01") int id, @Param("param02") String name);
}
